﻿using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Web;
using Acaweb.Model.Entities;
using Acaweb.Model.Entities.DatosCompuestos;

namespace Acaweb.Servicios.Contracts
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IPlanesEstudiosService" in both code and config file together.
    [ServiceContract]
    public interface IPlanesEstudiosService
    {
        /// <summary>
        /// Provee una lista de todos los Planes de estudios
        /// </summary>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetAll", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<PlanesEstudios> GetAll();

        /// <summary>
        /// Provee la información de un único plan de estudios
        /// </summary>
        /// <param name="Id">Codigo interno de un plan de estudios</param>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetById", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        PlanesEstudios GetById(int Id);

        /// <summary>
        /// Provee la lista de planes de estudios asociados a una facultad
        /// </summary>
        /// <param name="CodigoFacultad"></param>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetByFacultad", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]        
        List<PlanesEstudios> GetByFacultad(int CodigoFacultad);

        /// <summary>
        /// Provee la lista de planes de estudios de un tipo de programa
        /// </summary>
        /// <param name="CodigoFacultad"></param>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetByTipoPrograma", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<PlanesEstudios> GetByTipoPrograma(TipoPrograma TipoPrograma);
    }
}
